﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Los.Barcode;
using Los.Core;

namespace TestBarcode
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            DatabaseSettings set = new DatabaseSettings();
            set.Database = "school";
            set.Host = "localhost";
            set.Password = "ladder";
            set.User = "ladder";
            DatabaseSettings.SetSettings(set);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            var o = Interpreter.CreateObject("rela:id=16");
            if (o != null)
            {
                var r = new RelationCode((Relation)o);
                

                pictureBox1.Image = r.GetImage();
            }


        }
    }
}
